import request from '@/utils/request'

// 查询药材类型列表
export function listDrugCategory(query) {
  return request({
    url: '/yljf/drugCategory/list',
    method: 'get',
    params: query
  })
}

// 查询药材类型详细
export function getDrugCategory(id) {
  return request({
    url: '/yljf/drugCategory/' + id,
    method: 'get'
  })
}

// 新增药材类型
export function addDrugCategory(data) {
  return request({
    url: '/yljf/drugCategory',
    method: 'post',
    data: data
  })
}

// 修改药材类型
export function updateDrugCategory(data) {
  return request({
    url: '/yljf/drugCategory',
    method: 'put',
    data: data
  })
}

// 删除药材类型
export function delDrugCategory(id) {
  return request({
    url: '/yljf/drugCategory/' + id,
    method: 'delete'
  })
}
